package com.service.impl;



import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bean.Ciname;
import com.bean.Filming;
import com.bean.Ticket;
import com.bean.Users;
import com.mapper.UserMapper;

@Service
public class UserServiceImpl implements UserService {
      
	@Autowired
    private UserMapper userMapper;
      
	public UserMapper getUserMapper() {
		return userMapper;
	}

	public void setUserMapper(UserMapper userMapper) {
		this.userMapper = userMapper;
	}

	@Override
	public Integer regUser(Users user) {
		// TODO Auto-generated method stub
		return userMapper.regUser(user);
	}

	@Override
	public List<Users> loginUser(String userName, String password) {
		// TODO Auto-generated method stub
		return userMapper.loginUser(userName, password);
	}

	@Override
	public Integer updateUser(Users user) {
		// TODO Auto-generated method stub
		return userMapper.updateUser(user);
	}

	@Override
	public List<Ticket> findFilmsByUid(Integer uid) {
		// TODO Auto-generated method stub
		return userMapper.findFilmsByUid(uid);
	}

	@Override
	public List<Users> findUserByUid(Integer uid) {
		// TODO Auto-generated method stub
		return userMapper.findUserByUid(uid);
	}

	@Override
	public Integer updatePassword(Users user) {
		// TODO Auto-generated method stub
		return userMapper.updatePassword(user);
	}

	@Override
	public List<Filming> SelectFilmByStatus(Integer uid,String status) {
		// TODO Auto-generated method stub
		return userMapper.SelectFilmByStatus(uid, status);
	}

	@Override
	public Filming findFilmByFid(Integer fid) {
		// TODO Auto-generated method stub
		return userMapper.findFilmByFid(fid);
	}

	@Override
	public List<Filming> findCinameByFid(String fname) {
		// TODO Auto-generated method stub
		return userMapper.findCinameByFid(fname);
	}

	@Override
	public Ciname FindCinameByCid(Integer cid) {
		// TODO Auto-generated method stub
		return userMapper.FindCinameByCid(cid);
	}

	@Override
	public Integer buyTicket(Ticket ticket) {
		// TODO Auto-generated method stub
		return userMapper.buyTicket(ticket);
	}

	@Override
	public Integer changeTicketStatus(Integer tid,Integer status) {
		// TODO Auto-generated method stub
		return userMapper.changeTicketStatus(tid,status);
	}

	@Override
	public Ciname findCinameByCname(String cname) {
		// TODO Auto-generated method stub
		return userMapper.findCinameByCname(cname);
	}
 
}
